package com.hs.jhzd.entity;

import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;

import javax.persistence.*;
import java.util.Date;

@Data
@Entity
@Table(name = "jh_spxxb")
public class Goods {

    @Id
    @Column(name = "SPBH")
    private String code;

    @Column(name = "SPMC")
    private String name;

    @Column(name = "JLDW")
    private String unit;

    @Column(name = "DJ")
    private double unitPrice;

    @Column(name = "SPLB")
    private String categoryCode;

    @Column(name = "URL")
    private String url;

    @Column(name = "SFKM")
    private String visible;

    @Column(columnDefinition = "LONGBLOB", name = "ZP")
    private byte[] photo;

    @Column(name = "CJSJ",updatable = false)
    @CreationTimestamp
    @Temporal(TemporalType.TIMESTAMP)
    private Date cjsj;

    @Column(name = "CJR")
    private String cjr;

    @Column(name = "JSBH")
    private String jsbh;
    @Column(name = "JSMC")
    private String jsmc;

    @CreationTimestamp
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "SJC")
    private Date sjc;

    @Column(name = "SCBJ", columnDefinition = "tinyint default 0")
    private boolean scbj;
    // 是否限购
    @Column(name = "xgbj")
    private boolean isRestriction;
}
